<div class="container-fluid">
    <?php
//get item param from model
    $user = $viewModel->get('user');
    if (!is_object($user)) {
        echo 'User is not exist!';
    } else {
        ?>
        <h1>Update form</h1>
        <form class="form-horizontal" method="POST">
            <div class="control-group" style="display: none;">
                <label class="control-label" for="inputID">ID</label>
                <div class="controls">
                    <input type="text" id="inputID" name="account_id" value="<?php echo $user->account_id; ?>">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputUsername">Username</label>
                <div class="controls">
                    <input type="text" id="inputUsername" name="username" placeholder="Username" required="required" value="<?php echo $user->username; ?>">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputEmail">Email</label>
                <div class="controls">
                    <input type="email" id="inputEmail" name="email" placeholder="Email" required="required" value="<?php echo $user->email; ?>">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputPassword">Password</label>
                <div class="controls">
                    <input type="password" id="inputPassword" name="password" placeholder="Password" required="required">
                </div>
            </div>
            <hr />
            <div class="control-group">
                <label class="control-label" for="inputUsername">Full name</label>
                <div class="controls">
                    <input type="text" id="inputFullname" name="fullname" placeholder="Your Full name" required="required" value="<?php echo $user->fullname; ?>">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputUsername">Phone</label>
                <div class="controls">
                    <input type="text" id="inputPhone" name="phone" placeholder="Phone" required="required" value="<?php echo $user->phone; ?>">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputUsername">Address</label>
                <div class="controls">
                    <textarea id="inputAddress" name="address" placeholder="Address" required="required"><?php echo $user->address; ?></textarea>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="inputUsername">Status</label>
                <div class="controls">
                    <select name="status">
                        <option value="0" <?php echo ($user->status  == 0) ? "selected = 'selected'":"" ?>>Deactive</option>
                        <option value="1" <?php echo ($user->status  == 1) ? "selected = 'selected'":"" ?>>Active</option>
                    </select>
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <button type="submit" class="btn btn-success">Submit</button>
                    <button type="reset" class="btn">Reset</button>
                </div>
            </div>
        </form>
    <?php } ?>
</div>